<form action="{%:U('/admin/homepage/save')%}" onsubmit="return false" stverify="true" erroappend="true" ajaxpost="true" method="POST">
  <table class="table table-listing">
    <tbody>
    <tr>
      <td class="span4"><span class="text-red">*</span>图片：</td>
      <td>
          <input type="hidden" name="type" value="{%$type%}" />
          <input type="hidden" name="id" value="{%$info['id']%}" />
          <a class="btn btn-blue mr5" href="javascript:;" onclick="upImage()">上传</a>
          <div verify="1" class="inline">
            <div class="alert alert-info">
              <i class="icon"></i>
                {%if condition="$type == 'news'"%}
                <span>资讯幻灯片宽高：640*330</span>
                {%elseif condition="$type == 'news_v2'"/%}
                <span>资讯幻灯片宽高：640*200</span>
                {%elseif condition="$type == 'qrcode'"/%}
                <span>扫码广告图宽高：542*142</span>
                {%else/%}
                <span>建议图片宽高：597*867</span>
                {%/if%}
            </div>
          </div>
          <br />
          <input type="hidden" name="img" value="{%$info['img']%}" />
          <img src="{%$info['img']%}" alt="" height="100" />
      </td>
    </tr>
    {%if condition="$type == 'news' || $type == 'news_v2'"%}
    <tr>
      <td class="span4"><span class="text-red">*</span>图片对应的资讯ID：</td>
      <td>
        <input class="input" type="text" name="related_id" byteml="true" ml="1-250" opt="rq ml" value="{%$info['related_id']%}"/>
      </td>
    </tr>
    {%elseif condition="$type == 'start'"/%}
    <tr>
      <td class="span4"><span class="text-red">*</span>过期时间：</td>
      <td>
        <input class="input" type="text" name="expire_time" byteml="true" id="_calender" value="{%$info['expire_time']%}"/>
      </td>
    </tr>
    {%/if%}
    </tbody>
  </table>
</form>
<script src="__JAVASCRIPT__/ST.Calender.js"></script>
<script type="text/javascript">
    if($("#_calender").length > 0) {
        var this_year = new Date().getFullYear();
        var cal = new ST.Calender("_calender", "", this_year - 1, this_year);
    }
</script>
